package cn.edu.scau.cmi.ema.dao;

import java.util.Set;

import org.springframework.dao.DataAccessException;
import cn.edu.scau.cmi.ema.domain.*;
import cn.edu.scau.cmi.ema.domain.base.CmiPagination;

public interface RuleDAO extends JpaDao<Rule> {

	public Rule findRuleById(Integer id) throws DataAccessException;

	public Rule findRuleById(Integer id, int startResult, int maxRows) throws DataAccessException;

	public Set<Rule> findRuleByName(String name) throws DataAccessException;

	public Set<Rule> findRuleByName(String name, int startResult, int maxRows) throws DataAccessException;

	public Set<Rule> findRuleByNameContaining(String name_1) throws DataAccessException;

	public Set<Rule> findRuleByNameContaining(String name_1, int startResult, int maxRows) throws DataAccessException;

	public Set<Rule> findRuleByDescription(String description) throws DataAccessException;

	public Set<Rule> findRuleByDescription(String description, int startResult, int maxRows) throws DataAccessException;

	public Set<Rule> findRuleByDescriptionContaining(String description_1) throws DataAccessException;

	public Set<Rule> findRuleByDescriptionContaining(String description_1, int startResult, int maxRows)
			throws DataAccessException;

	public Rule findRuleByPrimaryKey(Integer id) throws DataAccessException;

	public Rule findRuleByPrimaryKey(Integer id, int startResult, int maxRows) throws DataAccessException;

	public Set<Rule> findRulesByIds(Set<Integer> ids) throws DataAccessException;

	public Set<Rule> findAllRules() throws DataAccessException;

	public Set<Rule> findAllRules(int startResult, int maxRows) throws DataAccessException;

	public Set<Rule> findRulesBySite(Integer siteId, int start, int max);

	public Set<Rule> findRuleByCompositeProperities(String sql, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Rule> findRulesByDetachedCriteria(CmiPagination page) throws DataAccessException;

	public Rule findRuleByPhysicalPrimaryKey(Integer siteId, String name) throws DataAccessException;

	public Rule findRuleByPhysicalPrimaryKey(Integer siteId, String name, int startResult, int maxRows)
			throws DataAccessException;
}
